Bentley Map V8i (SELECTseries 10) Help

Map Interoperability Connections Key-ins

Some functions of the interoperability system are available through key-ins. However, the interface must still be used to select features and properties as well as define symbology.

File Based Operations Key-ins

Use these key-ins to perform import and export operations.

Import Operations Key-ins

gdi open name=STORAGE_NAME file=filename

Opens the file or folder specified and associates it with a storage STORAGE_NAME.

Or

gdi open name=STORAGE_NAME user=Oracle User Name password=password server=Oracle service name

Opens the Oracle source specified and associates it with STORAGE_NAME.

Or

gdi open name=STORAGE_NAME storage=gmlstorage file=GML_filename schema=schema_filename

schema: schema belonging to GML file to be imported. Note that if this schema depends on other schemas (not OGC-related), they must be resolvable. This can be done in two ways:

  1. Includes and imports to schemas on the web (http)

  2. All those schemas are supplied as well, and includes and imports have correct relative paths to them.

gdi open name=mytown file=$(_USTN_WORKSPACEROOT)Projects\Examples\Geospatial\mytown\imp

gdi open name=PROPERTY user=JIM password=FOO server=ORCL

Command Line Options

Options can be prefaced by a feature name so that the option would apply to only that feature. See the example below.

  • feature | features | class | classes=[ feature1 [as newFeature1][, feature2[as newFeature2][, ...] ] – specifies one or more features to import from the data source with option name mapping

  • property | properties | column | columns=[ property1 [as newProperty1][, property2[as newProperty2][, ...]] – specifies which properties to import and optionally specify their name mapping

  • level | lv=[name | number]

  • co | color=[0-255 | [r,g,b] with values 0-100 | bylevel | bycell | standardColorName]

  • wt | weight=[integer | bylevel | bycell]

  • ls | style=[integer | bylevel | bycell]

  • elemclass=[primary | construction]

  • priority=[integer]

  • transparency=[double]

  • fill | fillco | fillcolor=[0-255 | [r,g,b] with values 0-100 | bylevel | bycell | standardColorName]

  • filltrans | filltransparency=[double]

  • textstyle=[text style name]

  • pba | textpba=[valid pba expression with square brackets where needed ]

  • cell=[cellName]

  • celllibrary | celllib | lib | library=[cell library file]

  • cellx | cellscalex=[double]

  • celly | cellscaley=[double]

  • cellz | cellscalez=[double]

  • where=[where clause] – a simple SQL fragment that filters the data to be imported. Can be prefixed by feature: to limit it to a specific feature.

Other non-symbology options:

  • fence=[true | false]

  • selection=[true | false]

  • view=[view number 1-8]

Export Operations Key-ins

The key-ins available for import are generally available for export as well.

The extension of the file name determines the format. The following extensions are supported:

  • Shp

  • Tab

  • Mif

  • Mid

  • Csv

To Export a Feature

gdi export file=filename.shp feature=feature_name

To Export as GML

gdi export storage=GMLStorage file=mygmlfile.xml schema=myschemafile.xsd feature=feature_name

Note: Please see the help for Command Line options for ways to customize the export process.

To Run a Saved Export Process

gdi export file=file.expx [fence=yes] [view=viewnum]

This will run an export process according to the contents of the specified file.expx. An .EXPX file is one that is created with the interoperability interface and saved as a file on disk. It defines all of the settings and parameters for an export process. If either of the optional spatial qualifiers (fence or view) are present then the export will be restricted to that fence or view.

Spatial Database Keyins

Key-in

Required arguments

Optional arguments

Notes

GDI CONNECT FILE

file=fileName

user=userName password=password

Workspace configuration variables can be used of the form $(VarName)

GDI CONNECT GRAPHICALSOURCE

name=graphicalSourceName

user=userName password=password

If name is not provided then an attempt will be made to connect to the first graphical source

GDI CONNECT ORACLE

user/password@host:port/database

user/password@host/database

user/password@service

-

Service is the TNS Service name

GDI CONNECT ORACLE

user=userName password=password host=hostName

database=databaseName

port=portNumber

User and password are optional if using Windows authentication

GDI CONNECT ORACLE

user=userName password=password

service=serviceName

-

User and password are optional if using Windows authentication.

Service is the TNS Service name

GDI CONNECT SQLSERVER

user/password@host:database

host:database

-

If using Windows authentication, use the second form.

e.g. gdi connect sqlserver localhost\SQLEXPRESS:EastCity

GDI CONNECT SQLSERVER

user=userName password=password host=hostName

database=databaseName

-

User and password are optional if using Windows authentication

GDI CONNECT WFS

user/password@url

user/password@url|namespace

-

url is the only required parameter, so you could have a connect string like @myurl.mydomain.com

GDI CONNECT WFS

url=url namespace=namespace

user=userName password=password

url is the only required parameter

For QUERY, POST, DISCARD, LOCK, UNLOCK, ERASE statements

feature=feature1,feature2,…

applywhere=true|false

-

a list of features to act upon

whether or not to apply the where clauses (default: true)

GDI QUERY

-

all

fence

view viewnum

Queries the selected features described in the Map Interoperability interface. A spatial qualifier needs to be present. If not, the user will be prompted through the standard interface. If All is specified then all selected features in the open connection will be queried. If either of the optional spatial qualifiers (fence or view) are present then the query will be restricted to that fence or view.

GDI LOCK

Not valid for WFS data sources

all

fence

view viewnum

selection

refresh=true|false

This will lock the features specified by the defined spatial qualifier.

whether or not to refresh features (default: false)

GDI UNLOCK

Not valid for WFS data sources

all

fence

view viewnum

selection

discard=true|false

This will unlock the features specified by the defined spatial qualifier

whether or not to discard changes (default: false)

GDI POST

Not valid for WFS data sources

all

fence

view viewnum

selection

continue=true|false

This will post all changed features subject to any partial posting variables and settings

whether or not to continue on error (default: true if GDI_PARTIAL_POSTING is set, false otherwise)

GDI DISCARD

Not valid for WFS data sources

all

fence

view viewnum

selection

refresh=true|false

retain=true|false

This will discard all changes made to any spatial features since the last lock or post process.

whether or not to refresh features (default: false)

whether or not to retain locks (default: false)

GDI ERASE

-

all

fence

view viewnum

selection

This will erase from the local DGN cache all features queried from the spatial data source. The erased features are specified by the defined spatial qualifier

GDI DISCONNECT

-

-

Disconnect from the current graphical source

Note: Make sure there are no spaces before and after the = sign in the above keyins.